<?php 
session_start();
include_once '../config.php';
$usrID=intval($_SESSION['usrID']);
$recID=intval($_GET['recID']);
$msg=$pdo->quote($_POST['msg']);
echo $pdo->exec("update chat set seen=1 where recID=$usrID and usrID=$recID and date < unix_timestamp()");
?>